{% extends "base.html" %}
{% load i18n %}
{% block title%}{% trans "luca_template_list" %}{% endblock%}
{% block breadcrumbs%}<li>{% trans "luca_template_list" %}</li>{% endblock%}

 
{% block content %}

      {% if messages %}
	        {% for message in messages %}
	       		<div class="alert alert-success">
	        	 <a href="#" class="close" data-dismiss="alert">&times;</a>
	       			{{ message }}
	   			</div>
	        {% endfor %}  
	  {% endif %}

<div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2>{% trans "luca_template_list" %}</h2>

                  <div class="box-icon">
                        <a href="/template/new" class="btn btn-bew btn-round btn-default"><i class="glyphicon glyphicon-plus"></i></a>
                    </div>
                </div>
                <div class="box-content">
                    <table class="table table-bordered table-striped table-condensed">
                        <thead>
                        <tr>
                            <th>{% trans "luca_template_name" %}</th>
                            <th class="hidden-xs">{% trans "created_at" %}</th>
                            <th class="hidden-xs">{% trans "updated_at" %}</th>
                            <th>{% trans "status" %}</th>
                        </tr>
                        </thead>
                        <tbody>
                  
                        {% if templates_list %}
						  
						    {% for template in templates_list %}
						 <tr>
                            <td><a href="/template/edit/{{template.id}}">{{template.name}}</a></td>
                            <td class="center hidden-xs">{{ template.created_at|date:"SHORT_DATE_FORMAT" }}</td>
                            <td class="center hidden-xs">{{ template.updated_at|date:"SHORT_DATE_FORMAT" }}</td>
                            <td class="center">
                              
							 {% if template.active == 1 %}
							    <span class="label-success label label-default">
							    	{% trans "active" %}
							    </span>
							 {% else %}
							    <span class="label label-default">
							    	{% trans "inactive" %}
							    </span>
							 {% endif %}  
							
                            </td>
                        </tr>
						    {% endfor %}
						  
						
						{% endif %}
						
						
                      
                        </tbody>
                    </table>

                </div>
            </div>

{% endblock %}
